home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 7 / 007.d81 / para tester (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  4KB  |  164 lines

  1. 1 rem parapsychology tester
  2. 3 rem modified by ra briggs lake wales,       fl
  3. 4 rem c64 translation by dan tobias
  4. 8 poke53280,6:poke53281,7:print""
  5. 10 gosub1500
  6. 20 gosub1200
  7. 25 sp$="                                       "
  8. 30 gosub277
  9. 40 deffnh(x)=1+d+4*(x-1)
  10. 100 print:print
  11. 110 v=4:h=1:gosub275:input"[200]ow many trials (5-33)";tr
  12. 120 iftr<5ortr>33then110
  13. 130 v=5:h=1:gosub275:input"[200]ow many choices (2-10)";nc
  14. 140 ifnc<2ornc>10then130
  15. 150 d=20-2*nc
  16. 170 f1=1:f2=1:f3=1
  17. 200 gosub277:gosub450
  18. 210 rn=int(rnd(0)*nc)+1
  19. 220 gosub590
  20. 230 ifrn<>nthen250
  21. 240 nh=nh+1
  22. 250 nt=nt+1:gosub670
  23. 260 ifnt=trthen870
  24. 270 goto200
  25. 275 printleft$("",v)spc(h-1):return
  26. 277 print"[147]                                        ":return
  27. 280 rem parameter input
  28. 290 printm$
  29. 300 geta$:ifa$=""then300
  30. 305 ifa$<>"[217]"anda$<>"y"anda$<>"[206]"anda$<>"n"then300
  31. 310 printa$:return
  32. 320 rem topline
  33. 330 ifnt=0thenpc=0:goto350
  34. 340 pc=int((nh/nt)*100)
  35. 350 print"[212]rials:"nt;
  36. 370 printtab(14)"[200]its:"nh;
  37. 380 printtab(24)"% [210]ight:";pc;"   "
  38. 400 return
  39. 410 rem noise feedback
  40. 440 return
  41. 450 rem print "hand"
  42. 470 forx=1tonc
  43. 480 fordl=1to30*(11-nc):next
  44. 490 fory=1to3:v=10+y
  45. 500 h=fnh(x):gosub275
  46. 510 print"   "
  47. 520 next
  48. 530 v=12:h=fnh(x):gosub275
  49. 540 ifx=10thenprint""0;:goto560
  50. 550 print""x;
  51. 560 next
  52. 573 h=1:v=18:gosub275
  53. 575 ifrs$="k"orrs$="[203]"then578
  54. 576 print"[202]oystick moves pointer left & right":print:print"[194]utton makes select
  55. 578 [153]"atnrrow keys move left & right":[153]:[153]"(NULL)val(NULL)(NULL)(NULL)(NULL)wait key makes selection"
  56. 580 [142]
  57. 590 [141]1300
  58. 660 [142]
  59. 670 [143] feedback routine
  60. 680 [139]f1[167][141]410
  61. 690 [139]f2[167][141]320
  62. 700 [139]f3[178]0[167][142]
  63. 710 [129]x[178]1[164]6
  64. 720 [139]rn[178]n[167]v[178]5:h[178]16:[141]275:[153]"(NULL)ight!!!"
  65. 730 [129]dl[178]1[164]75:[130]dl
  66. 750 [153]"wait";:[139]x[173]2[178][181](x[173]2)[167][153]"";
  67. 760 [129]y[178]1[164]3
  68. 770 v[178]10[170]y:h[178][165]h(rn):[141]275
  69. 780 [153]"   ";
  70. 790 [130]
  71. 800 v[178]12:h[178][165]h(rn):[141]275
  72. 810 [139]rn[178]10[167][153]" 0";:[137]830
  73. 820 [153]rn;
  74. 830 v[178]5:h[178]1:[141]275:[153]"wait                                       "
  75. 835 [129]dl[178]1[164]75:[130]dl
  76. 840 [130]
  77. 860 [142]
  78. 870 [143] do end of run statistics
  79. 880 [141]320
  80. 890 pb[178]0
  81. 895 [139]nh[178]0[167]940
  82. 900 [129]x[178]0[164]nh[171]1
  83. 910 [141]1060
  84. 920 pb[178]pb[170]pr
  85. 930 [130]
  86. 940 pb[178]1[171]pb
  87. 950 [141]277
  88. 960 v[178]5:h[178]8:[141]275:[153]"(NULL)rials:";nt
  89. 970 v[178]7:h[178]7:[141]275:[153]"lenhoices:";nc
  90. 980 v[178]9:h[178]10:[141]275:[153]"left$its:";nh
  91. 990 [153]"...................."
  92. 1000 [153]"(NULL)robability="pb
  93. 1010 [153]
  94. 1020 [139]pb[177].05[137]1030
  95. 1022 [153]"(NULL)his is statistically significant."
  96. 1025 [153]:[153]"(NULL)ou would do that well or better by"
  97. 1026 [153]:[153]"chance alone only"[181](pb[172]100)"percent of the time."
  98. 1027 [137]1050
  99. 1030 [153]"(NULL)his is not statistically significant."
  100. 1035 [153]:[153]"(NULL)ou would do at least that well by"
  101. 1040 [153]:[153]"chance alone"[181](pb[172]100)"percent of the time."
  102. 1050 v[178]23:h[178]12:[141]275:[153]"atngain ((NULL) or (NULL))"
  103. 1053 [161]ag$:[139]ag$[178]""[167]1053
  104. 1055 [139]ag$[178]"(NULL)"[176]ag$[178]"y"[167][156]:[137]20
  105. 1056 [139]ag$[179][177]"(NULL)"[175]ag$[179][177]"n"[167]1053
  106. 1058 [137]63000:[143] hook to menu here
  107. 1060 [143] calc. probability
  108. 1070 p[178]1[173]nc:q[178]1[171]p
  109. 1080 n[178]nt:[141]1130:n1[178]nf
  110. 1090 n[178]x:[141]1130:n2[178]nf
  111. 1100 n[178]nt[171]x:[141]1130:n3[178]nf
  112. 1110 pr[178](n1[172]p[174]x[172]q[174](nt[171]x))[173](n2[172]n3)
  113. 1120 [142]
  114. 1130 [143] factorial
  115. 1140 nf[178]1
  116. 1150 [129]ct[178]1[164]n
  117. 1160 nf[178]nf[172]ct
  118. 1170 [130]
  119. 1180 [142]
  120. 1200 [153]"load"
  121. 1212 [153]:[153][163]10)"(NULL)=(NULL)eyboard":[153][163]10)"mid$=mid$oystick"
  122. 1220 [153]:[153]"(NULL)hich"
  123. 1230 [161]rs$:[139]rs$[178]""[167]1230
  124. 1240 [153]rs$
  125. 1280 [153]"load";:[142]
  126. 1300 [143] keyboard input routine
  127. 1310 v[178]15:n[178][181](nc[173]2)[170]1
  128. 1320 h[178]1:[141]275:[153]sp$;:h[178]1[170][165]h(n):[141]275:[153]"^";
  129. 1325 [139]rs$[179][177]"k"[175]rs$[179][177]"(NULL)"[167][141]1400:[137]1340
  130. 1330 [161]a$:[139]a$[178]""[167]1330
  131. 1340 [139]a$[178][199](13)[167][142]
  132. 1350 [139]a$[178]"cmd"[176]a$[178]""[167]n[178]n[171]1:[137]1380
  133. 1360 [139]a$[178]""[176]a$[178]"on"[167]n[178]n[170]1:[137]1380
  134. 1370 [137]1325
  135. 1380 [139]n[179]1[167]n[178]nc
  136. 1390 [139]n[177]nc[167]n[178]1
  137. 1395 [137]1320
  138. 1400 [143] joystick
  139. 1401 [129]a[178]1[164]20:[130]:[143] delay
  140. 1402 a$[178]""
  141. 1403 jv[178][194](56321):[143] get joystick value
  142. 1404 fr[178]jv[175]16:jv[178]15[171](jv[175]15)
  143. 1405 [139]fr[179][177]16[167]a$[178][199](13):[142]
  144. 1410 [139]jv[178]4[176]jv[178]5[176]jv[178]6[167]a$[178]"cmd":[142]
  145. 1420 [139]jv[178]8[176]jv[178]9[176]jv[178]10[167]a$[178]"":[142]
  146. 1430 [142]
  147. 1500 [153]"load"[163]8)"(NULL)arapsychology (NULL)ester"
  148. 1510 [153]:[153]"  (NULL)his program was written by str$avid"
  149. 1520 [153]:[153]"str$urkee and was sent to (NULL)oftdisk by"
  150. 1530 [153]:[153]"(NULL).atn. peekriggs.  right$t was translated to the"
  151. 1535 [153]:[153]"lenommodore 64 by str$aniel (NULL)obias.  right$t first"
  152. 1540 [153]"appeared on page 223 of the mid$une 1983"
  153. 1545 [153]:[153]"issue of (NULL)oftalk magazine."
  154. 1550 [153]:[153]"  (NULL)he object of the program is to try"
  155. 1560 [153]:[153]"to outguess the len-64 (NULL)andom (NULL)umber"
  156. 1570 [153]:[153]"chr$enerator.  right$f you guess right often"
  157. 1580 [153]:[153]"enough then maybe you have val(NULL)(NULL)."
  158. 1599 v[178]24:h[178]13:[141]275:[153]"left$it space barwait";
  159. 1600 [161]r$:[139]r$[178]""[167]1600
  160. 1610 [153]r$:[142]
  161. 63000 [143]    connect back to l.s.
  162. 63002 [153]"loadload"[199](34)"payload"[199](34)",8":[153]"run"
  163. 63004 [151]198,0:[151]631,13:[151]632,13:[151]198,2:[128]
  164.